<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        alert("haha");
    </script>
    <script src="./javascript.js"></script>
    <!-- 
        js编写的位置有三种  
          1.在body中直接写（耦合度高，不推荐使用）
          2.在<script>标签中写
          3.引入外部javascript文件
    -->
</head>
<body>
    <button onclick="alert('讨厌，点我干嘛！');">别点</button>
    <a href="JavaScript:alert('让你点你就点');">点</a>
</body>
</html>